package org.zjt.agent.generate;

import org.zjt.agent.ClassDefineDescription;

import java.util.Optional;


/**
 * Description:
 *
 * @author juntao.zhang
 * Date: 2018-07-04 下午11:38
 * @see
 */
public class ByteCodeGenerateAdapter implements ByteCodeGenerator<ClassDefineDescription> {


    private final ByteCodeGenerator byteCodeGenerator;

    public ByteCodeGenerateAdapter(ByteCodeGenerator byteCodeGenerator) {
        this.byteCodeGenerator = byteCodeGenerator;
    }


    @Override
    public Optional<byte[]> generate(org.zjt.agent.ClassDefineDescription classDefine) {
        return byteCodeGenerator.generate(classDefine);
    }

}
